<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		<h1>[name]</h1>

		<div class="desc">
		An object providing a [link:https://en.wikipedia.org/wiki/Mask_(computing) bit mask] and accessor methods
		used to control an [page:Object3D]'s visibility.
		A [page:Layers] object assigns an [page:Object3D] to 0 or more of 32 layers numbered 0 to 31.<br /><br />

		This is used to control visibility - an object must share a layer with a [page:Camera camera]
		to be visible when that camera's view is renderered.<br /><br />

		All classes that inherit from [page:Object3D] have a [property:layers] property which is an instance
		of this class.
		</div>


		<h2>Constructor</h2>


		<h3>[name]()</h3>
		<div>
		Create a new Layers object, with an initial mask set to layer 1.
		</div>

		<h2>Properties</h2>

		<h3>[property:Integer mask]</h3>
		<div>
		Internal layer mask.
		</div>


		<h2>Methods</h2>

		<h3>[method:null disable]( [page:Integer layer] )</h3>
		<div>
		layer - an integer from 0 to 31.<br /><br />

		Remove *layer* from the mask.
		</div>

		<h3>[method:null enable]( [page:Integer layer] )</h3>
		<div>
		layer - an integer from 0 to 31.<br /><br />

		Add *layer* to the mask.
		</div>

		<h3>[method:null set]( [page:Integer layer] )</h3>
		<div>
		layer - an integer from 0 to 31.<br /><br />

		Set the layer mask to the value *layer*.
		</div>

		<h3>[method:Boolean test]( [page:Integer layers] )</h3>
		<div>
		layers - a 32bit bit mask of layer numbers.<br /><br />

		Returns true if *layers* and [page:.mask] have any bits set in common.
		</div>

		<h3>[method:null toggle]( [page:Integer layer] )</h3>
		<div>
		layer - an integer from 0 to 31.<br /><br />

		Toggle the *layer* value in the mask.
		</div>

		<h2>Source</h2>

		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
	</body>
</html>
